package com.atguigu.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * description: todo
 *
 * @author sun jun
 * @className MySelfRule
 * @date 2020/3/25 21:40
 */
@Configuration
public class MySelfRule {

    /**
     * description: 定义为随机
     *
     * @param
     * @return com.netflix.loadbalancer.IRule
     * @author sunjun
     * @date 2020/3/25 21:41
     */
    @Bean
    public IRule myRule(){
        return new RandomRule();
    }
}
